package com.peas.platform.module.icims.base.approve.controller.vo;

import com.peas.platform.common.core.annotation.Comment;
import com.peas.platform.common.core.vo.BaseVo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.*;

@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel("审批单")
public class ApproveOrderVo extends BaseVo {

    // （审批流程表）外键
    @Comment(value = "审批流程ID")
    @ApiModelProperty(value = "审批流程ID")
    @NotNull(message = "审批流程ID不能为空")
    private Long approveId;

    @Comment(value = "审批单编号")
    @ApiModelProperty(value = "审批单编号")
    @NotBlank(message = "审批单编号不能为空")
    @Size(max = 100, message = "审批单编号不能超过100个字符")
    private String approveOrderCode;

    @Comment(value = "审批单名称")
    @ApiModelProperty(value = "审批单名称")
    @Size(max = 200, message = "审批单名称不能超过200个字符")
    private String approveOrderName;

    // 审批中、通过、驳回、关闭
    @Comment(value = "审批单状态", enumType = "ApproveOrderState")
    @ApiModelProperty(value = "审批单状态", notes = "枚举取值:ApproveOrderState")
    @Size(max = 20, message = "审批单状态不能超过20个字符")
    private String state;

    // （用户表）外键
    @Comment(value = "提交人用户ID")
    @ApiModelProperty(value = "提交人用户ID")
    @NotNull(message = "提交人用户ID不能为空")
    private Long submitUserId;

    @Comment(value = "当前节点编号")
    @ApiModelProperty(value = "当前节点编号")
    @Max(value = 9, message = "当前节点编号取值无效")
    private Integer currentNo;

    @Comment(value = "当前节点名称")
    @ApiModelProperty(value = "当前节点名称")
    @Size(max = 100, message = "当前节点名称不能超过100个字符")
    private String currentName;

    // 【组织架构表】多ID逗号分隔
    @Comment(value = "当前审批节点组织架构ID")
    @ApiModelProperty(value = "当前审批节点组织架构ID")
    @Size(max = 250, message = "当前审批节点组织架构ID不能超过250个字符")
    private String currentApproveOrgId;

    // 【角色表】多ID逗号分隔
    @Comment(value = "当前审批节点角色ID")
    @ApiModelProperty(value = "当前审批节点角色ID")
    @Size(max = 250, message = "当前审批节点角色ID不能超过250个字符")
    private String currentApproveRoleId;

    // 【用户表】多ID逗号分隔
    @Comment(value = "当前审批节点用户ID")
    @ApiModelProperty(value = "当前审批节点用户ID")
    @Size(max = 250, message = "当前审批节点用户ID不能超过250个字符")
    private String currentApproveUserId;

    // 【组织架构表】多ID逗号分隔
    @Comment(value = "下一节点审批节点组织架构ID")
    @ApiModelProperty(value = "下一节点审批节点组织架构ID")
    @Size(max = 250, message = "下一节点审批节点组织架构ID不能超过250个字符")
    private String nextApproveOrgId;

    // 【角色表】多ID逗号分隔
    @Comment(value = "下一节点审批节点角色ID")
    @ApiModelProperty(value = "下一节点审批节点角色ID")
    @Size(max = 250, message = "下一节点审批节点角色ID不能超过250个字符")
    private String nextApproveRoleId;

    // 【用户表】多ID逗号分隔
    @Comment(value = "下一节点审批节点用户ID")
    @ApiModelProperty(value = "下一节点审批节点用户ID")
    @Size(max = 250, message = "下一节点审批节点用户ID不能超过250个字符")
    private String nextApproveUserId;

    // 通过、驳回
    @Comment(value = "审批结果", enumType = "ApproveResult")
    @ApiModelProperty(value = "审批结果", notes = "枚举取值:ApproveResult")
    @Size(max = 20, message = "审批结果不能超过20个字符")
    private String approveResult;

    @Comment(value = "审批意见")
    @ApiModelProperty(value = "审批意见")
    private String approveOpinion;

    @Comment(value = "业务单类型", enumType = "ApproveOrderBusinessType")
    @ApiModelProperty(value = "业务单类型", notes = "枚举取值:ApproveOrderBusinessType")
    @Size(max = 20, message = "业务单类型不能超过20个字符")
    private String businessType;

    // 外键
    @Comment(value = "业务单ID")
    @ApiModelProperty(value = "业务单ID")
    private Long businessId;

    @Comment(value = "业务单详情URL")
    @ApiModelProperty(value = "业务单详情URL")
    @Size(max = 500, message = "业务单详情URL不能超过500个字符")
    private String businessUrl;

    @Comment(value = "业务处理BeanClass")
    @ApiModelProperty(value = "业务处理BeanClass")
    @Size(max = 200, message = "业务处理BeanClass不能超过200个字符")
    private String businessClass;

}
